package org.hpin.asset.service;

import org.hpin.asset.dao.AssetmaintaininfoDao;
import org.hpin.asset.entity.Assetmaintaininfo;
import org.hpin.common.core.orm.BaseEntity;
import org.hpin.common.core.orm.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service(value = "org.hpin.asset.service.AssetmaintaininfoService")
@Transactional(rollbackFor = Exception.class)
public class AssetmaintaininfoService extends BaseService {
	@Autowired
	private AssetmaintaininfoDao assetmaintaininfoDao;
	
	@Override
	public BaseEntity findById(String id) {
		return super.findById(id);
	}

	@Override
	public void save(BaseEntity baseEntity) {
		super.save(baseEntity);
	}

	/**
	 * 删除维修信息
	 * @param ids
	 */
	public void deleteMSG(String [] ids) {
		for(int i=0;i< ids.length;i++){
			Assetmaintaininfo assetmaintaininfo = (Assetmaintaininfo) assetmaintaininfoDao.findById(Assetmaintaininfo.class,ids[i]);
			assetmaintaininfoDao.delete(assetmaintaininfo);
		}
	}
}
